
let hd = {
	data: [1, 2, 3, 34, 5, 7]
};
Object.setPrototypeOf(hd, {
	max() {
		return this.data.sort((a, b) => b - a)[0];
	}
});

// 调用原型对象上的方法
console.log(hd.max());

let xj = {
	lessons: { js: 87, php: 63, node: 99, linux: 88 },
  //getter
  get data() {
  	return Object.values(this.lessons);
  }
};
console.log(hd.max.call(xj));